package com.retail.member.client;

import com.alibaba.fastjson.JSONObject;
import com.retail.core.entity.result.Result;
import com.retail.member.entity.request.MemberUserRequest;
import com.retail.member.entity.vo.RetailMultiTeamResVo;
import com.retail.member.entity.vo.RetailTeamResVo;
import com.retail.order.entity.vo.SysAdminVerifyStasticResVo;
import com.retail.proxy.entity.request.SysAdminApplyProxyRequest;
import com.retail.system.entity.request.AdminRequest;
import com.retail.system.entity.vo.AdminVo;
import com.retail.team.entity.request.RetailTeamAddSpRequest;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface UserClient {

    /**
     * 得到openid
     * @param jsCode
     * @return
     */
    Result getWeixinOpenid(String jsCode);

    /**
     * 得到用户信息
     * @param openid
     * @return
     */
    Result getUser(String openid);

    Result getUserStatistics(String openid);
    /**
     * 保存用户信息
     * @param userRequest
     * @return
     */
    Result saveUser(MemberUserRequest userRequest);

    Result uploadImage(MultipartFile file);

    Result registerUser(AdminRequest adminRequest);

    Result updateUserInfo(AdminRequest adminRequest);

    /**
     * 下级用户
     * @param adminId
     * @return
     */
    Result<RetailMultiTeamResVo> teams(Long adminId);

    Result<List<AdminVo>> myteams(Long adminId);

    Result<SysAdminVerifyStasticResVo> userstastics(Long adminId);

    Result<RetailTeamResVo> teamDetail(Long adminId);

    Result<RetailTeamResVo> authInfo(Long adminId, JSONObject jsonObject);

    Result<List<AdminVo>> noParentIdAdmin();


    Result<Integer> saveTeamAddSp(RetailTeamAddSpRequest request);

    Result<Integer> applyPorxy(SysAdminApplyProxyRequest request);


    Result updateCity(Long id, String city);
    
}
